//
//  SendGroupMessageHeadView.m
//  CoachsBook
//
//  Created by MaBookPro on 2022/8/20.
//

#import "SendGroupMessageHeadView.h"

@implementation SendGroupMessageHeadView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self CreateUI];
    }
    return self;
}
-(void)CreateUI{

    
    UIView *backview = [[UIView alloc]initWithFrame:CGRectMake(0, 0, APPwidth, 300)];
    backview.backgroundColor = [UIColor whiteColor];
    [self addSubview:backview];

    UIView *myDataLineV = [[UIView alloc]initWithFrame:CGRectMake(15, 15, 3, 15)];
    myDataLineV.backgroundColor = rgba(22, 120, 255, 1);
    myDataLineV.layer.cornerRadius = 2;
    [backview addSubview:myDataLineV];
    UILabel *myDataLab = [[UILabel alloc]initWithFrame:CGRectMake(myDataLineV.frame.size.width+myDataLineV.frame.origin.x+5,15, 70, 15)];
    myDataLab.text = @"短信详情";
    myDataLab.textColor = [UIColor blackColor];
    myDataLab.textAlignment = 0;
    myDataLab.font = [UIFont systemFontOfSize:16 weight:bold];
    [backview addSubview:myDataLab];


    
    UILabel *choiceLb = [[UILabel alloc]initWithFrame:CGRectMake(15, myDataLab.frame.size.height+myDataLab.frame.origin.y+10, APPwidth-30, 40)];
    choiceLb.text = @"选择学员";
    choiceLb.textAlignment = 0;
    choiceLb.font = [UIFont systemFontOfSize:14];
    choiceLb.textColor = rgba(51, 51, 51, 1);
    [backview addSubview:choiceLb];
    
    UIButton *nochoiceLabBtn = [[UIButton alloc]initWithFrame:CGRectMake(choiceLb.width-80,  10, 70, 20)];
    [nochoiceLabBtn setTitle:@"未选择" forState:0];
    nochoiceLabBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    nochoiceLabBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [nochoiceLabBtn setTitleColor:rgba(153, 153, 153, 1) forState:0];
    [nochoiceLabBtn setImage:[UIImage imageNamed:@"arrowl"] forState:0];
    nochoiceLabBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 60, 0, -60);
    [nochoiceLabBtn.imageView setContentMode:UIViewContentModeScaleAspectFit];
    nochoiceLabBtn.titleEdgeInsets = UIEdgeInsetsMake(0, -5, 0, 10);
    [choiceLb addSubview:nochoiceLabBtn];
    
    
    UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0,choiceLb.height-1, APPwidth, 1)];
    line.backgroundColor = rgba(245, 245, 250, 1);
    [choiceLb addSubview:line];

    
    UILabel *bianjiLab = [[UILabel alloc]initWithFrame:CGRectMake(15,  choiceLb.frame.size.height + choiceLb.frame.origin.y+15, 60, 20)];
    bianjiLab.text = @"编辑短信";
    bianjiLab.textColor = rgba(138, 138, 138, 1);
    bianjiLab.textAlignment = 0;
    bianjiLab.font = [UIFont systemFontOfSize:14];
    [backview addSubview:bianjiLab];
    
    
    UIButton *newstencilBtn = [[UIButton alloc]initWithFrame:CGRectMake(APPwidth-120, choiceLb.frame.size.height+choiceLb.frame.origin.y+10, 100, 20)];
    [newstencilBtn setTitle:@"保存为新模板" forState:0];
    newstencilBtn.titleLabel.textAlignment = 2;
    newstencilBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [newstencilBtn setTitleColor:rgba(22, 120, 255, 1) forState:0];
    [backview addSubview:newstencilBtn];
    
    UITextView *txtv = [[UITextView alloc]initWithFrame:CGRectMake(15, bianjiLab.height + bianjiLab.y+15, APPwidth-30, 150)];
    txtv.text = @"请输入短信内容";
    txtv.layer.cornerRadius = 8;
    txtv.backgroundColor = rgba(245, 246, 249, 1);
    [backview addSubview:txtv];
    
    
    UIView *line1 = [[UIView alloc]initWithFrame:CGRectMake(0, backview.height-10, APPwidth, 10)];
    line1.backgroundColor = rgba(245, 245, 250, 1);
    [backview addSubview:line1];
 
    
    
    
}

@end
